package com.yezong.AidMe.entity;

import java.util.Date;
//订单：
public class Order {
    private Integer id;//订单号
    private Integer lid;//借出者id
    private Integer bid;//借入者id
    private Date publishtime;//发布借出帖的日期时间
    private String publishlocation;//发布借出帖地址
    private Date lendtime;//有人接受借出帖的日期时间
    private Date ddltime;//还物的日期时间
    private Boolean isborrowed = false;//是否已经被借出，默认未借出
    private Boolean isback = false;//是否已经还物，默认未还
    //判断订单状态（参考分类：未借出,正在借用中,预期未还,延时借用中,已完成还物，异常协商处理中）
    private String type;//物品种类
    private String title;//借出帖标题
    private String details;//借出帖描述
    private Double price;//价钱
    private Integer view = 0;//浏览次数
    private Double distance;//与本地距离

    public Order() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getLid() {
        return lid;
    }

    public void setLid(Integer lid) {
        this.lid = lid;
    }

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public Date getPublishtime() {
        return publishtime;
    }

    public void setPublishtime(Date publishtime) {
        this.publishtime = publishtime;
    }

    public Date getLendtime() {
        return lendtime;
    }

    public void setLendtime(Date lendtime) {
        this.lendtime = lendtime;
    }

    public Date getDdltime() {
        return ddltime;
    }

    public void setDdltime(Date ddltime) {
        this.ddltime = ddltime;
    }

    public Boolean getIsborrowed() {
        return isborrowed;
    }

    public void setIsborrowed(Boolean isborrowed) {
        this.isborrowed = isborrowed;
    }

    public Boolean getIsback() {
        return isback;
    }

    public void setIsback(Boolean isback) {
        this.isback = isback;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getView() {
        return view;
    }

    public void setView(Integer view) {
        this.view = view;
    }

    public String getPublishlocation() {
        return publishlocation;
    }

    public void setPublishlocation(String publishlocation) {
        this.publishlocation = publishlocation;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", lid=" + lid +
                ", bid=" + bid +
                ", publishtime=" + publishtime +
                ", publishlocation='" + publishlocation + '\'' +
                ", lendtime=" + lendtime +
                ", ddltime=" + ddltime +
                ", isborrowed=" + isborrowed +
                ", isback=" + isback +
                ", type='" + type + '\'' +
                ", title='" + title + '\'' +
                ", details='" + details + '\'' +
                ", price=" + price +
                ", view=" + view +
                ", distance=" + distance +
                '}';
    }
}
